<?php

$User = UserCheck($GL, $_GET['id']);
if ($User) {
    if ($_POST["check_yes"] != "yes") {
        $t_tpl = GetTpl("accept");
        $msg = "Запустить Ices для пользователя <b>$User</b>?";
        $t_tpl = str_replace("{msg}", $msg, $t_tpl);
        $t_title = "Запустить Ices";
        $HEADER .=" - ".$t_title;
        $t_BODY = $t_tpl;
    }
    else {
        if (GetTariff($GL, $_GET['id']) and IcesStart($GL, $_GET['id'], $User)) {
            Logger($LogFile, "ADMIN START ICES ($User)");
            header("Location: http://" . $SITE . "/?action=panel");
        }
        else {
            header("Location: http://" . $SITE . "/?action=error");
        }
    }
}
else {
     header("Location: http://" . $SITE . "/?action=nouser");
}

?>
